package com.kgc.personcommon.remote;

import com.kgc.basic.util.ResponseMsg;
import com.kgc.personcommon.pojo.Permission;
import org.springframework.web.bind.annotation.*;
import reactor.core.publisher.Mono;

import java.util.Map;

public interface PermissionRemote {
    @RequestMapping("getPermPage")
    @ResponseBody
    ResponseMsg getPermPage(@RequestBody Map<String, Object> map);

    @RequestMapping("addPerm")
    @ResponseBody
    ResponseMsg addPerm(@RequestBody Permission permission);

    @RequestMapping("updatePerm")
    @ResponseBody
    ResponseMsg updatePerm(@RequestBody Permission permission);

    @RequestMapping("delPerm")
    @ResponseBody
    ResponseMsg delPerm(@RequestParam("id") String  id);

    @RequestMapping("getPermById")
    @ResponseBody
    ResponseMsg getPermById(@RequestParam("id") String id);

    @RequestMapping("getAllPerm")
    @ResponseBody
    ResponseMsg getAllPerm(@RequestBody Map<String, Object> map);
    @RequestMapping("getPermissionForPath")
    @ResponseBody
    public Mono<Permission> getPermissionForPath(@RequestParam("path") String path);
}
